<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>弹性盒子</title>
    <style>
        body{
            background-color: cornflowerblue;
        }
        .box {
            display: flex;
            justify-content: space-around;

            background-color: mediumslateblue;
        }
        .div {
            background-color: teal;

            width: 100px;
            height: 100px;

            border: 1px solid #333333;
        }
        .all{
             display: flex;
             justify-content: center;
         }

        .box2 {
            display: flex;

            flex-wrap: wrap-reverse;
            justify-content: center;
            background-color: hotpink;
            width: 300px;
            height: 250px;
        }

        .div2 {
            background-color: brown;
            width: 100px;
            height: 100px;
            margin: 10px;
            border: 1px solid #333333;
        }
        .box3 {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            background-color: #ffe420;
            width: 300px;
            height: 250px;
        }

        .div3 {
            background-color: #3da500;
            width: 100px;
            height: 100px;
            margin: 10px;
            border: 1px solid #333333;
        }

    </style>
</head>
<body>

<div class="box">
    <div class="div">1111</div>
    <div class="div">22222</div>
    <div class="div">33333</div>
</div>

<br>
<div class="all">
    <div class="box3">
        <div class="div3">1111</div>
        <div class="div3">22222</div>
        <div class="div3">33333</div>
    </div>

   <div class="box2">
        <div class="div2">1111</div>
        <div class="div2">22222</div>
        <div class="div2">33333</div>

    </div>
</div>
</body>
</html>